﻿using System;
using NUnit.Framework;

namespace CirclesCenterCalculation
{
    [TestFixture]
    class Tester
    {
        /*
        [Test]
        public void CalcTest()
        {
            double x1, y1, x2, y2, R, x0, y0;
            bool leftTurn;
            #region North-East            
            x1 = 2; y1 = 1;
            x2 = 6; y2 = 3;
            R = Math.Sqrt(20);
            //left
            leftTurn = true;
            Program.CalcCenter(x1, y1, x2, y2, R, leftTurn, out x0, out y0);
            Assert.AreEqual(0.0, Math.Round(x0, 3));
            Assert.AreEqual(5.0, Math.Round(y0, 3));
            //right
            leftTurn = false;
            Program.CalcCenter(x1, y1, x2, y2, R, leftTurn, out x0, out y0);
            Assert.AreEqual(4.0, Math.Round(x0, 3));
            Assert.AreEqual(-3.0, Math.Round(y0, 3));
            #endregion
            #region South-East             
            x1 = 4; y1 = -1;
            x2 = 6; y2 = -2;
            R = Math.Sqrt(20);
            //left
            leftTurn = true;
            Program.CalcCenter(x1, y1, x2, y2, R, leftTurn, out x0, out y0);
            Assert.AreEqual(6.0, Math.Round(x0, 3));
            Assert.AreEqual(3.0, Math.Round(y0, 3));
            //right
            leftTurn = false;
            Program.CalcCenter(x1, y1, x2, y2, R, leftTurn, out x0, out y0);
            Assert.AreEqual(2.0, Math.Round(x0, 3));
            Assert.AreEqual(-5.0, Math.Round(y0, 3));
            #endregion
            #region North-West
            x1 = 2; y1 = -1;
            x2 = -2; y2 = 1;
            R = Math.Sqrt(20);
            //left
            leftTurn = true;
            Program.CalcCenter(x1, y1, x2, y2, R, leftTurn, out x0, out y0);
            Assert.AreEqual(0.0, Math.Round(x0, 3));
            Assert.AreEqual(-5.0, Math.Round(y0, 3));
            //right
            leftTurn = false;
            Program.CalcCenter(x1, y1, x2, y2, R, leftTurn, out x0, out y0);
            Assert.AreEqual(4.0, Math.Round(x0, 3));
            Assert.AreEqual(3.0, Math.Round(y0, 3));
            #endregion
            #region South-West
            x1 = 2; y1 = 1;
            x2 = 0; y2 = 0;
            R = Math.Sqrt(20);
            //left
            leftTurn = true;
            Program.CalcCenter(x1, y1, x2, y2, R, leftTurn, out x0, out y0);
            Assert.AreEqual(4.0, Math.Round(x0, 3));
            Assert.AreEqual(-3.0, Math.Round(y0, 3));
            //right
            leftTurn = false;
            Program.CalcCenter(x1, y1, x2, y2, R, leftTurn, out x0, out y0);
            Assert.AreEqual(0.0, Math.Round(x0, 3));
            Assert.AreEqual(5.0, Math.Round(y0, 3));
            #endregion
            #region North
            x1 = 0; y1 = -2;
            x2 = 0; y2 = 0;
            R = 5.0;
            //left
            leftTurn = true;
            Program.CalcCenter(x1, y1, x2, y2, R, leftTurn, out x0, out y0);
            Assert.AreEqual(-5.0, Math.Round(x0, 3));
            Assert.AreEqual(-2.0, Math.Round(y0, 3));
            //right
            leftTurn = false;
            Program.CalcCenter(x1, y1, x2, y2, R, leftTurn, out x0, out y0);
            Assert.AreEqual(5.0, Math.Round(x0, 3));
            Assert.AreEqual(-2.0, Math.Round(y0, 3));
            #endregion
            #region South
            x1 = 2; y1 = 1;
            x2 = 2; y2 = 0;
            R = 5.0;
            //left
            leftTurn = true;
            Program.CalcCenter(x1, y1, x2, y2, R, leftTurn, out x0, out y0);
            Assert.AreEqual(7.0, Math.Round(x0, 3));
            Assert.AreEqual(1.0, Math.Round(y0, 3));
            //right
            leftTurn = false;
            Program.CalcCenter(x1, y1, x2, y2, R, leftTurn, out x0, out y0);
            Assert.AreEqual(-3.0, Math.Round(x0, 3));
            Assert.AreEqual(1.0, Math.Round(y0, 3));
            #endregion
            #region East
            x1 = 0; y1 = -2;
            x2 = 2; y2 = -2;
            R = 5.0;
            //left
            leftTurn = true;
            Program.CalcCenter(x1, y1, x2, y2, R, leftTurn, out x0, out y0);
            Assert.AreEqual(0.0, Math.Round(x0, 3));
            Assert.AreEqual(3.0, Math.Round(y0, 3));
            //right
            leftTurn = false;
            Program.CalcCenter(x1, y1, x2, y2, R, leftTurn, out x0, out y0);
            Assert.AreEqual(0.0, Math.Round(x0, 3));
            Assert.AreEqual(-7.0, Math.Round(y0, 3));
            #endregion
            #region West
            x1 = 0; y1 = 200;
            x2 = -1000000; y2 = 200;
            R = 5.0;
            //left
            leftTurn = true;
            Program.CalcCenter(x1, y1, x2, y2, R, leftTurn, out x0, out y0);
            Assert.AreEqual(0.0, Math.Round(x0, 3));
            Assert.AreEqual(195.0, Math.Round(y0, 3));
            //right
            leftTurn = false;
            Program.CalcCenter(x1, y1, x2, y2, R, leftTurn, out x0, out y0);
            Assert.AreEqual(0.0, Math.Round(x0, 3));
            Assert.AreEqual(205.0, Math.Round(y0, 3));
            #endregion
        }
        */
    }
}
